import {isPromise}from './isPromise';
import {getValue}from './getValue';

export const getPromiseValue=(value,isReject)=>{
    if(isPromise(value)){
        return value;
    }
    const _value=getValue(value);
    return Promise[isReject?'reject':'resolve'](_value);
};
export default getPromiseValue;

